/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package za.ac.cput.given.designpatterns.structural.composite;

/**
 *
 * @author bassoncj
 */
public class CompositeMainFactory {
    private static CompositeMainFactory componentMainFactoryFactory = null;
    
    private CompositeMainFactory(){
        
    }
    
    public synchronized static CompositeMainFactory getInstance(){
        if(componentMainFactoryFactory == null){
            componentMainFactoryFactory = new CompositeMainFactory();
        }
        return componentMainFactoryFactory;
    }
    
    public ComponentFactory getComponentFactory(){
        return new ComponentFactory();
    }
    
    public CompositeFactory getCompositeFactory(){
        return new CompositeFactory();
    }
}
